//
//  HCExchangeTableViewCell.m
//  HappyChildren
//
//  Created by WillyZhao on 2017/5/12.
//  Copyright © 2017年 WillyZhao. All rights reserved.
//

#import "HCExchangeTableViewCell.h"

#import "HCMineExchangeModel.h"

@interface HCExchangeTableViewCell () {
    
}

@end

@implementation HCExchangeTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    
    self.IMGCon.constant = YBKAdaptiveH(70);
    self.IMG.contentMode = UIViewContentModeScaleAspectFit;
    self.name.textColor = YBKRGBCOLOR(186, 9, 61, 1);
    self.lineView.backgroundColor = YBKRGBCOLOR(241, 241, 241, 1);
    self.colorLabel.textColor = [UIColor lightGrayColor];
    self.sizeLabel.textColor = [UIColor lightGrayColor];
    self.numLabel.textColor = [UIColor lightGrayColor];
}

-(void)setModel:(id)model {
    
    HCMineExchangeData *data = (HCMineExchangeData *)model;
    self.name.text = [NSString stringWithFormat:@"%@",data.name];
    self.price.text = [NSString stringWithFormat:@"积分:%@",data.price];
    self.time.text = [NSString stringWithFormat:@"创建时间:%@",[PublicFunction getDateFromNSString2:data.create_time]];
    [self.IMG sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@",data.img]]];
    
    self.colorLabel.text = [NSString stringWithFormat:@"颜色:%@",data.color];
    self.sizeLabel.text = [NSString stringWithFormat:@"尺码:%@",data.size];
    self.numLabel.text = [NSString stringWithFormat:@"数量:%@",data.num];
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
